<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>     
     <class name="cn.firstsoft.modules.loge.domain.LogeRecord" table="loge_record">
        <id name="id" type="integer">
            <column name="id" />
            <generator class="native" >
				<param name="sequence">LOGE_RECORD_ID_SEQ</param>
            </generator>
        </id>
         <property name="no" type="string">
            <column name="no" length="50" />
        </property>
         <property name="beginDate" type="timestamp">
            <column name="beginDate" length="23"/>
        </property>
         <property name="endDate" type="timestamp">
            <column name="endDate" length="23"/>
        </property>
        <property name="certificateno" type="string">
            <column name="certificateno" length="50" />
        </property>
        <property name="certificatetype" type="string">
            <column name="certificatetype" length="50" />
        </property>
        <property name="logecount" type="integer">
            <column name="logecount" />
        </property>
        <property name="charge" type="double">
            <column name="charge" />
        </property>
         <property name="rem" type="string">
            <column name="rems" length="250" />
        </property>
        <property name="status" type="string">
            <column name="status" length="10" />
        </property>
         <property name="userName" type="string">
            <column name="user_name" length="10" />
        </property>
        <property name="createDate" type="timestamp">
            <column name="create_date"/>
       </property>
        <many-to-one name="createUser" class="org.springside.modules.security.domain.User" fetch="select">
            <column name="create_userid" />
        </many-to-one>
        <many-to-one name="applyUser" class="org.springside.modules.security.domain.User" fetch="select">
            <column name="apply_userid" />
        </many-to-one>
        <many-to-one name="logeBed" class="cn.firstsoft.modules.loge.domain.LogeBed" fetch="select">
            <column name="bed_id"/>
         </many-to-one>
          <many-to-one name="logeApply" class="cn.firstsoft.modules.loge.domain.LogeApply" fetch="select">
            <column name="apply_id"/>
         </many-to-one>
         <many-to-one name="logeLeave" class="cn.firstsoft.modules.loge.domain.LogeLeave" fetch="select">
            <column name="leave_id"/>
         </many-to-one>
    </class>
</hibernate-mapping>
